-
Notifications
You must be signed in to change notification settings - Fork 8
Changes for making extension work with lambda managed instance environment #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements support for Lambda elevator mode (lambda-managed-instances) in the extension. The changes enable the extension to operate in two modes: standard mode (existing behavior) and elevator mode (new behavior), determined by the AWS_LAMBDA_INITIALIZATION_TYPE environment variable.
Key Changes:
- Introduces new elevator producer/consumer architecture that uses HTTP server for receiving telemetry data and flush signaling mechanism
- Modifies extension initialization and registration to conditionally support elevator mode
- Updates Telemetry API schema version to "2025-01-29" for elevator mode
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lambda-extensions/workers/elevatorProducer.go | New HTTP server implementation for receiving telemetry data in elevator mode with queue threshold monitoring |
| lambda-extensions/workers/elevatorConsumer.go | New consumer implementation for processing queued telemetry data with signal-based flushing |
| lambda-extensions/sumologic-extension.go | Main extension modified to detect and initialize elevator mode based on environment variable |
| lambda-extensions/lambdaapi/telemetryapiclient.go | Updated to conditionally use different schema version based on mode |
| lambda-extensions/lambdaapi/extensionapiclient.go | Modified to register different event types based on mode |
| lambda-extensions/lambdaapi/telemetryapiclient_test.go | Test updated to pass new isElevator parameter |
| lambda-extensions/lambdaapi/extensionapiclient_test.go | Test updated to pass new isElevator parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| var rawMsgArr [][]byte | ||
| var logsStr string | ||
| var runtime_done = 0 |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name 'runtime_done' uses snake_case which is inconsistent with Go naming conventions. It should be renamed to 'runtimeDone' to follow camelCase style.
|
|
||
| var rawMsgArr [][]byte | ||
| var logsStr string | ||
| var runtime_done = 0 |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'runtime_done' is initialized to 0 but never modified, making it a constant value. This variable appears to serve no functional purpose in the current implementation and should be removed along with its return value, or the function should be updated to return the actual count of messages processed.
| esc.logger.Debugf("Elevator Consumer: DrainQueue complete. Runtime done: %d", runtime_done) | ||
| return runtime_done |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'runtime_done' is initialized to 0 but never modified, making it a constant value. This variable appears to serve no functional purpose in the current implementation and should be removed along with its return value, or the function should be updated to return the actual count of messages processed.
PR Details
Changes for making extension work with lambda elevator environment
Description
Attached the details of the changes made
ELEVATOR_MODE_IMPLEMENTATION.md
Related Issue
Checklist